﻿/*
#**************************************************************************
#  openSIS is a student information system for public and non-public 
#  schools from Open Solutions for Education, Inc. web: www.os4ed.com
#
#  openSIS is  web-based, open source, and comes packed with features that 
#  include student demographic info, scheduling, grade book, attendance, 
#  report cards, eligibility, transcripts, parent portal, 
#  student portal and more.   
#
#  Visit the openSIS web site at http://www.opensis.com to learn more.
#  If you have question regarding this system or the license, please send 
#  an email to info@os4ed.com.
#
#  This program is released under the terms of the GNU General Public License  
#  as  published by the Free Software Foundation, version 2 of the License. 
#  See license.txt.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#**************************************************************************** 

*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using OSISStaffDataLayer;


/// <summary>
/// Summary description for StaffAddBL
/// </summary>
/// 

namespace OSISStaffBusinessLayer
{

    public class StaffBL
    {
        private string photourl;
        private int staffid;
        private string certificateid;
        private int schoolid;
        private string firstname;
        private string lastname;
        private string middlename;
        private string district;
        private int state;
        private string gender;
        private string dob;
        private string email;
        private string language;
         private string ethnicity;        
        private string stafftype;
        private string staffssn;
        private string currentaddress;
        private string primaryaddress1;
        private string primaryaddress2;
        private string primarycity;
        private string primarystate;
        private string primaryzip;
        private string secondaryaddress1;
        private string secondaryaddress2;
        private string secondarycity;
        private string secondarystate;
        private string secondaryzip;
        private string phonetype;
        private string phonedisplay;
        private string phoneunlisted;
        private string countrycode;
        private string areacode;
        private string phonenumber;
        private int homeschoolid;
        private string joiningdate;
        private string leftdate;        
        private string schoolname;
        private string role;
        private string username;
        private string password;
        private string accountactive;
        private string lastupdated;
        private string certdate;
        private string certexpirdate;
        private string certcode;
        private string certshortname;
        private string certname;
        private string primarycert;
        private string secondarycert;
        //Added newly
        private string staffidnumber;
        private string alternateid;
        private string salutation;
        private string suffix;
        private string secondlang;
        private string thirdlang;
        private string disability;
        private string disabilitydesc;
        private string pobox;
        private string homephon;
        private string mobilphon;
        private string officphon;
        private string workemail;
        private string personalemail;
        private string emrgnfirstnam;
        private string emrgnlastnam;
        private string emrgnrelationship;
        private string emrgnhomephon;
        private string emrgnworkphon;
        private string emrgnmobilephon;
        private string emrgnemail;
        private string opensisacces;
        private string secretquestn;
        private string secretanswr;
        private string jobtitle;
        private string certdescription;                     
        private string libraryaccess;
        private string librarycard;
        private string libraryclass;
        private string status;
        private string schoolaccess;

        public StaffBL()
        {
            //
            // TODO: Add constructor logic here
            //
         photourl = "";
         certificateid = "";
         staffid =0;
         schoolid =0;
         firstname ="";
         lastname  ="";
         middlename ="";
         district ="";
         state =0;
         gender ="";
         dob ="";
         email="";
         language ="";         
         ethnicity = "";      
         stafftype = "";
         staffssn = "";
         currentaddress ="";
         primaryaddress1 ="";
         primaryaddress2="";
         primarycity="";
         primarystate="";
         primaryzip ="";
         secondaryaddress1="";
         secondaryaddress2="";
         secondarycity="";
         secondarystate ="";
         secondaryzip="";
         phonetype="";
         phonedisplay="";
         phoneunlisted="";
         countrycode="";
         areacode="";
         phonenumber="";
         homeschoolid=0;
         joiningdate="";
         leftdate="";
         stafftype="";
         schoolname="";
         role="";
         username = "";
         password = "";
         accountactive = "";
         lastupdated = "";
         certdate = "";
         certexpirdate = "";
         certcode = "";
         certshortname = "";
         certname = "";
         primarycert = "";
         secondarycert = "";
         staffidnumber="";
         alternateid="";
         salutation="";
         suffix="";
         secondlang="";
         thirdlang="";
         disability="";
         disabilitydesc="";
         pobox="";
         homephon="";
         mobilphon="";
         officphon="";
         workemail="";
         personalemail="";
         emrgnfirstnam="";
         emrgnlastnam="";
         emrgnrelationship="";
         emrgnhomephon="";
         emrgnworkphon="";
         emrgnmobilephon="";
         emrgnemail="";
         opensisacces="";
         secretquestn="";
         secretanswr="";
         jobtitle="";
         certdescription="";                      
         libraryaccess="";
         librarycard="";
         libraryclass="";
         status="";
         schoolaccess = "";
        }


        //added newly]

        public string PhotoUrl
        {
            get
            {
                return this.photourl;
            }
            set
            {
                this.photourl = value;

            }
        }

        public string Certificateid
        {
            get
            {
                return this.certificateid;
            }
            set
            {
                this.certificateid = value;

            }
        }
        public string StaffIdNumber
        {
            get
            {
                return this.staffidnumber;
            }
            set
            {
                this.staffidnumber = value;

            }
        }
        public string Alternateid
        {
            get
            {
                return this.alternateid;
            }
            set
            {
                this.alternateid = value;

            }
        }
        public string Suffix
        {
            get
            {
                return this.suffix;
            }
            set
            {
                this.suffix = value;

            }
        }
        public string Salutation
        {
            get
            {
                return this.salutation;
            }
            set
            {
                this.salutation = value;

            }
        }
        public string Secondlang
        {
            get
            {
                return this.secondlang;
            }
            set
            {
                this.secondlang = value;

            }
        }

        public string Thirdlang
        {
            get
            {
                return this.thirdlang;
            }
            set
            {
                this.thirdlang = value;

            }
        }
        public string Disability
        {
            get
            {
                return this.disability;
            }
            set
            {
                this.disability = value;

            }
        }
        public string Disabilitydesc
        {
            get
            {
                return this.disabilitydesc;
            }
            set
            {
                this.disabilitydesc = value;

            }
        }
        public string PoBox
        {
            get
            {
                return this.pobox;
            }
            set
            {
                this.pobox = value;

            }
        }
        public string HomePhone
        {
            get
            {
                return this.homephon;
            }
            set
            {
                this.homephon = value;

            }
        }
        public string Officphon
        {
            get
            {
                return this.officphon;
            }
            set
            {
                this.officphon = value;

            }
        }
        public string MobilPhon
        {
            get
            {
                return this.mobilphon;
            }
            set
            {
                this.mobilphon = value;

            }
        }
        public string WorkEmail
        {
            get
            {
                return this.workemail;
            }
            set
            {
                this.workemail = value;

            }
        }
        public string Personalemail
        {
            get
            {
                return this.personalemail;
            }
            set
            {
                this.personalemail = value;

            }
        }
        public string Emrgnfirstnam
        {
            get
            {
                return this.emrgnfirstnam;
            }
            set
            {
                this.emrgnfirstnam = value;

            }
        }
        public string Emrgnlastnam
        {
            get
            {
                return this.emrgnlastnam;
            }
            set
            {
                this.emrgnlastnam = value;

            }
        }
        public string Emrgnrelationship
        {
            get
            {
                return this.emrgnrelationship;
            }
            set
            {
                this.emrgnrelationship = value;

            }
        }
        public string EmrgnHomePhon
        {
            get
            {
                return this.emrgnhomephon;
            }
            set
            {
                this.emrgnhomephon = value;

            }
        }
        public string EmrgnMobilePhon
        {
            get
            {
                return this.emrgnmobilephon;
            }
            set
            {
                this.emrgnmobilephon = value;

            }
        }
        public string EmrgnWorkPhon
        {
            get
            {
                return this.emrgnworkphon;
            }
            set
            {
                this.emrgnworkphon = value;

            }
        }
        public string Emrgnemail
        {
            get
            {
                return this.emrgnemail;
            }
            set
            {
                this.emrgnemail = value;

            }
        }
        public string OpensisAcces
        {
            get
            {
                return this.opensisacces;
            }
            set
            {
                this.opensisacces = value;

            }
        }

        public string SecretQuestn
        {
            get
            {
                return this.secretquestn;
            }
            set
            {
                this.secretquestn = value;

            }
        }
        public string SecretAnswr
        {
            get
            {
                return this.secretanswr;
            }
            set
            {
                this.secretanswr = value;

            }
        }

        public string Jobtitle
        {
            get
            {
                return this.jobtitle;
            }
            set
            {
                this.jobtitle = value;

            }
        }

        public string CertDescription
        {
            get
            {
                return this.certdescription;
            }
            set
            {
                this.certdescription = value;

            }
        }

        public string Status
        {
            get
            {
                return this.status;
            }
            set
            {
                this.status = value;

            }
        }
        public string LibraryAccess
        {
            get
            {
                return this.libraryaccess;
            }
            set
            {
                this.libraryaccess = value;

            }
        }
        public string LibraryCard
        {
            get
            {
                return this.librarycard;
            }
            set
            {
                this.librarycard = value;

            }
        }
        public string LibraryClass
        {
            get
            {
                return this.libraryclass;
            }
            set
            {
                this.libraryclass = value;

            }
        }

        public string SchoolAccess
        {
            get
            {
                return this.schoolaccess;
            }
            set
            {
                this.schoolaccess = value;

            }
        }

        //added newly





        public string PhoneType
        {
            get
            {
                return this.phonetype;
            }
            set
            {
                this.phonetype = value;

            }
        }

        public string Phonedisplay
        {
            get
            {
                return this.phonedisplay;
            }
            set
            {
                this.phonedisplay = value;

            }
        }

        public string PhoneUnlisted
        {
            get
            {
                return this.phoneunlisted;
            }
            set
            {
                this.phoneunlisted = value;

            }
        }

        public string CountryCode
        {
            get
            {
                return this.countrycode;
            }
            set
            {
                this.countrycode = value;

            }
        }

        public string AreaCode
        {
            get
            {
                return this.areacode;
            }
            set
            {
                this.areacode = value;

            }
        }

        public string PhoneNumber
        {
            get
            {
                return this.phonenumber;
            }
            set
            {
                this.phonenumber = value;

            }
        }






        public int StaffId
        {
            get
            {
                return this.staffid;
            }
            set
            {
                this.staffid = value;

            }
        }
        public int SchoolId
        {
            get
            {
                return this.schoolid;
            }
            set
            {
                this.schoolid = value;

            }
        }
        public string FirstName
        {
            get
            {
                return this.firstname;
            }
            set
            {
                this.firstname = value;

            }
        }
        public string LastName
        {
            get
            {
                return this.lastname;
            }
            set
            {
                this.lastname = value;

            }
        }
        public string MiddleName
        {
            get
            {
                return this.middlename;
            }
            set
            {
                this.middlename = value;

            }
        }
        public string District
        {
            get
            {
                return this.district;
            }
            set
            {
                this.district = value;

            }
        }
        public int State
        {
            get
            {
                return this.state;
            }
            set
            {
                this.state = value;

            }
        }
        public string Gender
        {
            get
            {
                return this.gender;
            }
            set
            {
                this.gender = value;

            }
        }
        public string DOB
        {
            get
            {
                return this.dob;
            }
            set
            {
                this.dob = value;

            }
        }

        public string EMail
        {
            get
            {
                return this.email;
            }
            set
            {
                this.email = value;

            }
        }
        public string Language
        {
            get
            {
                return this.language;
            }
            set
            {
                this.language = value;

            }
        }
        public string Ethnicity
        {
            get
            {
                return this.ethnicity;
            }
            set
            {
                this.ethnicity = value;

            }
        }
        public string StaffType
        {
            get
            {
                return this.stafftype;
            }
            set
            {
                this.stafftype = value;

            }
        }
        public string StaffSSN
        {
            get
            {
                return this.staffssn;
            }
            set
            {
                this.staffssn = value;

            }
        }
        public string CurrentAddress
        {
            get
            {
                return this.currentaddress;
            }
            set
            {
                this.currentaddress = value;

            }
        }
        public string PrimaryAddress1
        {
            get
            {
                return this.primaryaddress1;
            }
            set
            {
                this.primaryaddress1 = value;

            }
        }
        public string PrimaryAddress2
        {
            get
            {
                return this.primaryaddress2;
            }
            set
            {
                this.primaryaddress2 = value;

            }
        }
        public string PrimaryCity
        {
            get
            {
                return this.primarycity;
            }
            set
            {
                this.primarycity = value;

            }
        }
        public string PrimaryState
        {
            get
            {
                return this.primarystate;
            }
            set
            {
                this.primarystate = value;

            }
        }
        public string PrimaryZip
        {
            get
            {
                return this.primaryzip;
            }
            set
            {
                this.primaryzip = value;

            }
        }


        public string SecondaryAddress1
        {
            get
            {
                return this.secondaryaddress1;
            }
            set
            {
                this.secondaryaddress1 = value;

            }
        }
        public string SecondaryAddress2
        {
            get
            {
                return this.secondaryaddress2;
            }
            set
            {
                this.secondaryaddress2 = value;

            }
        }
        public string SecondaryCity
        {
            get
            {
                return this.secondarycity;
            }
            set
            {
                this.secondarycity = value;

            }
        }
        public string SecondaryState
        {
            get
            {
                return this.secondarystate;
            }
            set
            {
                this.secondarystate = value;

            }
        }
        public string SecondaryZip
        {
            get
            {
                return this.secondaryzip;
            }
            set
            {
                this.secondaryzip = value;

            }
        }
        public int HomeSchoolId
        {
            get
            {
                return this.homeschoolid;
            }
            set
            {
                this.homeschoolid = value;

            }
        }
        
        public string JoiningDate
        {
            get
            {
                return this.joiningdate;
            }
            set
            {
                this.joiningdate = value;

            }
        }
        public string LeftDate
        {
            get
            {
                return this.leftdate;
            }
            set
            {
                this.leftdate = value;

            }
        }

        public string SchoolName
        {
            get
            {
                return this.schoolname;
            }
            set
            {
                this.schoolname = value;

            }
        }
        public string Role
        {
            get
            {
                return this.role;
            }
            set
            {
                this.role = value;

            }
        }
        public string Username
        {
            get
            {
                return this.username;
            }
            set
            {
                this.username = value;

            }
        }
        public string Password
        {
            get
            {
                return this.password;
            }
            set
            {
                this.password = value;

            }
        }
        public string AccountActive
        {
            get
            {
                return this.accountactive;
            }
            set
            {
                this.accountactive = value;

            }
        }
        public string LastUpdated
        {
            get
            {
                return this.lastupdated;
            }
            set
            {
                this.lastupdated = value;

            }
        }
        public string CertDate
        {
            get
            {
                return this.certdate;
            }
            set
            {
                this.certdate = value;

            }
        }
        public string CertExpirDate
        {
            get
            {
                return this.certexpirdate;
            }
            set
            {
                this.certexpirdate = value;

            }
        }
        public string CertCode
        {
            get
            {
                return this.certcode;
            }
            set
            {
                this.certcode = value;

            }
        }
        public string CertShortName
        {
            get
            {
                return this.certshortname;
            }
            set
            {
                this.certshortname = value;

            }
        }
        public string CertName
        {
            get
            {
                return this.certname;
            }
            set
            {
                this.certname = value;

            }
        }
        public string Primarycert
        {
            get
            {
                return this.primarycert;
            }
            set
            {
                this.primarycert = value;

            }
        }
        public string SecondaryCert
        {
            get
            {
                return this.secondarycert;
            }
            set
            {
                this.secondarycert = value;

            }
        }


        public DataSet PopulateEthnicity()
        {
            StaffDL STADL = new StaffDL();
            //ddl.Items.Clear();
            DataSet ds = null;
            ds = STADL.PopulateEthnicity();
            //ddl.DataSource = ds.Tables[0];
            //ddl.DataTextField = "eth_nm";
            //ddl.DataValueField = "eth_id";
            //ddl.DataBind();
            //ddl.Items.Insert(0, new ListItem("Select", "0"));
            return ds;
        
        
        }
        public DataSet PopulateLanguage()
        {
            StaffDL STADL = new StaffDL();
            //ddl.Items.Clear();
            DataSet ds = null;
            ds = STADL.PopulateLanguage();
            //ddl.DataSource = ds.Tables[0];
            //ddl.DataTextField = "language_nm";
            //ddl.DataValueField = "language_id";
            //ddl.DataBind();
            //ddl.Items.Insert(0, new ListItem("Select", "0"));
            return ds;
        }
        public DataSet PopulateState()
        {
            StaffDL STADL = new StaffDL();
            //ddl.Items.Clear();
            DataSet ds = null;
            ds = STADL.PopulateState();
            //ddl.DataSource = ds.Tables[0];
            //ddl.DataTextField = "NAME";
            //ddl.DataValueField = "IID";
            //ddl.DataBind();
            //ddl.Items.Insert(0, new ListItem("Select", "0"));
            return ds;
        }
        public DataSet PopulateStaffType()
        {
            StaffDL STADL = new StaffDL();
            //ddl.Items.Clear();
            DataSet ds = null;
            ds = STADL.PopulateStaffType();
            //ddl.DataSource = ds.Tables[0];
            //ddl.DataTextField = "stf_type_name";
            //ddl.DataValueField = "stf_type_cd";
            //ddl.DataBind();
            //ddl.Items.Insert(0, new ListItem("Select", "0"));
            return ds;
        }        
        public DataSet PopulateSchools()
        {
            StaffDL STADL = new StaffDL();
            //ddl.Items.Clear();
            DataSet ds = null;
            ds = STADL.PopulateSchools();
            //ddl.DataSource = ds.Tables[0];
            //ddl.DataTextField = "sch_full_nm";
            //ddl.DataValueField = "sch_id";
            //ddl.DataBind();
            //ddl.Items.Insert(0, new ListItem("Select", "0"));
            return ds;
        }
        public DataSet PopulateSchoolsCheckbox()
        {
            StaffDL STADL = new StaffDL();
            //chk.Items.Clear();
            DataSet ds = null;
            ds = STADL.PopulateSchools();
            //chk.DataSource = ds.Tables[0];
            //chk.DataTextField = "sch_full_nm";
            //chk.DataValueField = "sch_id";
            //chk.DataBind();
            return ds;
        }
        public DataSet PopulateGender()
        {
            StaffDL STADL = new StaffDL();
            //ddl.Items.Clear();
            DataSet ds = null;
            ds = STADL.populategender();
            //ddl.DataSource = ds.Tables[0];
            //ddl.DataTextField = "gender_nm";
            //ddl.DataValueField = "gender_id";
            //ddl.DataBind();
            //ddl.Items.Insert(0, new ListItem("Select", "0"));
            return ds;
        }
        public void PopulateAccessRoles(ref DropDownList ddl)
        {
            StaffDL STADL = new StaffDL();
            ddl.Items.Clear();

            DataSet ds = null;
            ds = STADL.PopulateAccessRole();
            ddl.DataSource = ds.Tables[0];
            ddl.DataTextField = "acc_role_nm";
            ddl.DataValueField = "acc_role_id";
            ddl.DataBind();
            ddl.Items.Insert(0, new ListItem("Select", "0"));
           



        }
        public void PopulatePhoneType(ref System.Web.UI.WebControls.DropDownList ddl)
        {
            StaffDL STADL = new StaffDL();
            ddl.Items.Clear();

            DataSet ds = null;
            ds = STADL.PopulatePhoneType();
            ddl.DataSource = ds.Tables[0];
            ddl.DataTextField = "phn_type_nm";
            ddl.DataValueField = "phn_type_id";
            ddl.DataBind();
            ddl.Items.Insert(0, new ListItem("Select", "0"));
           

        }
        
        public  string GenerateRandomNumber(int NoOfCharacter)
        {
            System.Text.StringBuilder builder = new System.Text.StringBuilder();
            Random random = new Random();
            int digit;
            for (int i = 0; i < NoOfCharacter; i++)
            {
                digit = Convert.ToInt32(Math.Floor(10 * random.NextDouble()));
                builder.Append(digit);
            }
            return builder.ToString();
        }

        public int InsertStaffDetails()
        {
            StaffDL STADL = new StaffDL();
            int staffid = STADL.InsertStaffDetails(this);
            return staffid;
        }

         public void InsertStaffAccessDetails()
        {
            StaffDL STADL = new StaffDL();
            STADL.InsertStaffAccessDetails(this);

            
        }

         public void InsertStaffAddressDetails()
        {
            StaffDL STADL = new StaffDL();
            STADL.InsertStaffAddressDetails(this);


        }

         public void InsertStaffPhoneDetails()
        {
            StaffDL STADL = new StaffDL();
            STADL.InsertStaffPhoneDetails(this);


        }

         public void InsertStaffSchoolJoinDetails()
        {
            StaffDL STADL = new StaffDL();
            STADL.InsertStaffSchoolJoinDetails(this);


        }

         public void InsertStaffCertificateDetails()
        {
            StaffDL STADL = new StaffDL();
            STADL.InsertStaffCertificateDetails(this);


        }

         public void InsertStaffLibraryDetails()
        {
            StaffDL STADL = new StaffDL();
            STADL.InsertStaffLibraryDetails(this);


        }

         public void InsertStaffEmergncyContact()
        {
            StaffDL STADL = new StaffDL();
            STADL.InsertStaffEmergncyContact(this);


        }

         public DataTable PopulateStaffBySchoolid()
         {
            StaffDL STADL = new StaffDL();
            DataTable dt = STADL.PopulateStaffBySchoolid(this);
            return dt;
         }

         public DataTable PopulateStaffdetails()
         {
             StaffDL STADL = new StaffDL();
             DataTable dt = STADL.PopulateStaffdetails(this);
             return dt;           		

         }

         public DataTable PopulateSchoolaccesschkbox()
         {
             StaffDL STADL = new StaffDL();
             //chk.Items.Clear();
             DataTable dt = null;
             dt = STADL.PopulateSchoolaccesschkbox(this);
             return dt;
             //chk.DataSource = dt;
             //chk.DataTextField = "sch_full_nm";
             //chk.DataValueField = "sch_id";
             //chk.DataBind();
           
         }

         public DataTable PopulateCertification()
         {
             StaffDL STADL = new StaffDL();
             
             DataTable dt = null;
             dt = STADL.PopulateCertification(this);
             return dt;

         }

         public DataTable GetFirstStudentIdBySchoolId()
         {
             StaffDL STADL = new StaffDL();

             DataTable dt = null;
             dt = STADL.GetFirstStaffIdBySchoolId(this);
             return dt;

         }

         public DataTable GetLastStaffIdBySchoolId()
         {
             StaffDL STADL = new StaffDL();

             DataTable dt = null;
             dt = STADL.GetLastStaffIdBySchoolId(this);
             return dt;

         }

         public DataTable GetNextStaffId()
         {
             StaffDL STADL = new StaffDL();

             DataTable dt = null;
             dt = STADL.GetNextStaffId(this);
             return dt;

         }

         public DataSet GetPreviousStaffId()
         {
             StaffDL STADL = new StaffDL();

             DataSet dt = null;
             dt = STADL.GetPreviousStaffId(this);
             return dt;

         }

         public DataTable PopulateStaffdetailsEdit()
         {
             StaffDL STADL = new StaffDL();
             DataTable dt = STADL.PopulateStaffdetailsEdit(this);
             return dt;             
         }

         public void UpdateStaffDetails()
         {
             StaffDL STADL = new StaffDL();
             STADL.UpdateStaffDetails(this);


         }

         public void UpdateStaffaccessDetails()
         {
             StaffDL STADL = new StaffDL();
             STADL.UpdateStaffaccessDetails(this);


         }

         public void UpdateStaffaddressDetails()
         {
             StaffDL STADL = new StaffDL();
             STADL.UpdateStaffaddressDetails(this);


         }

         public void UpdateStaffcertificationDetails()
         {
             StaffDL STADL = new StaffDL();
             STADL.UpdateStaffcertificationDetails(this);


         }

         public void UpdateStaffemergencyDetails()
         {
             StaffDL STADL = new StaffDL();
             STADL.UpdateStaffemergencyDetails(this);


         }

         public void UpdateStafflibaccessDetails()
         {
             StaffDL STADL = new StaffDL();
             STADL.UpdateStafflibaccessDetails(this);


         }

         public void UpdateStaffphoneDetails()
         {
             StaffDL STADL = new StaffDL();
             STADL.UpdateStaffphoneDetails(this);


         }

         public void UpdateStaffschooljoinDetails()
         {
             StaffDL STADL = new StaffDL();
             STADL.UpdateStaffschooljoinDetails(this);


         }

         public int CheckLibAccessbyStaffid()
         {
             StaffDL STADL = new StaffDL();
             int libacc;
             libacc = STADL.CheckLibAccessbyStaffid(this);
             return libacc;

         }

         public void savestaffphoto()
         {
             StaffDL STADL = new StaffDL();
             STADL.savestaffphoto(this);
             
         }

         public DataTable PopulatestaffPhoto()
         {
             DataTable dt = null;
             StaffDL STADL = new StaffDL();
             dt = STADL.PopulatestaffPhoto(this);
              return dt;
         }

         public void Updatestaffphoto()
         {
             
             StaffDL STADL = new StaffDL();
            STADL.Updatestaffphoto(this);
          }

    }
}
